package com.runen.wnhz.runen.ui.adapter.puadapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by Administrator on 2018/5/7 0007.
 */

public class CourseVpAdapter extends FragmentPagerAdapter {
    private List<Fragment> mDatas;
    private List<String> mTitles;

    public CourseVpAdapter(FragmentManager fm, List<Fragment> datas, List<String> titles) {
        super(fm);
        this.mDatas = datas;
        this.mTitles = titles;
    }

    @Override
    public Fragment getItem(int position) {
        return mDatas.get(position);
    }

    @Override
    public int getCount() {
        return mDatas.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles.get(position);
    }

}
